package com.neiquan.secondhand.po;

import com.neiquan.backstage.core.PO;
import com.neiquan.backstage.core.bsc.CRUD;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.security.KeyStore;
import java.util.Date;

/**
 * 用户表
 * Created by luochenxi on 2016/7/21.
 */
@Entity
@org.hibernate.annotations.Entity(selectBeforeUpdate = true, dynamicUpdate = true)
@Table(name = "sh_user")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@CRUD
public class User extends PO {
    @Override
    public Serializable getId() {
        return null;
    }

    @Id
    @GeneratedValue(generator = "generator")
    @GenericGenerator(name = "generator", strategy = "uuid.hex")
    @Column(name = "id", unique = true, nullable = false)
    private String id;//主键

    private String account;//用户名

    private String password;//密码

    private String telephone;//手机号

    @Column(name = "identify_code")
    private String identifyCode;//注册验证码

    private String nickname;//昵称

    @Column(name = "head_img_url")
    private String headImgUrl;//头像地址

    @Column(name = "sex",length = 1)
    private Integer sex;//性别 0男 1女  2保密

    private String qq;//qq号

    private String  birthday;//生日

    @Column(name = "current_address")
    private String currentAddress;//当前地址

    private String hometown;//家乡

    private Integer role; //角色 0买家 1卖家

    @Column(name = "pay_account")
    private String payAccount;//支付账户

    @Column(name = "pay_name")
    private String payName;//支付昵称

    @Column(name = "flag",length = 1)
    private Integer flag;//禁止状态 0未禁止 1已禁止

    @Column(name = "is_delete",length = 1)
    private Integer isDelte;//删除状态 0未删除 1已删除

    @Column(name = "create_time")
    private  Long createTime;//创建时间

    @Column(name = "create_id")
    private  String createId;//创建ID；

    public void setId(String id) {
        this.id = id;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public String getIdentifyCode() {
        return identifyCode;
    }

    public void setIdentifyCode(String identifyCode) {
        this.identifyCode = identifyCode;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getHeadImgUrl() {
        return headImgUrl;
    }

    public void setHeadImgUrl(String headImgUrl) {
        this.headImgUrl = headImgUrl;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public String getQq() {
        return qq;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public String getCurrentAddress() {
        return currentAddress;
    }

    public void setCurrentAddress(String currentAddress) {
        this.currentAddress = currentAddress;
    }

    public String getHometown() {
        return hometown;
    }

    public void setHometown(String hometown) {
        this.hometown = hometown;
    }

    public Integer getRole() {
        return role;
    }

    public void setRole(Integer role) {
        this.role = role;
    }

    public String getPayAccount() {
        return payAccount;
    }

    public void setPayAccount(String payAccount) {
        this.payAccount = payAccount;
    }

    public String getPayName() {
        return payName;
    }

    public void setPayName(String payName) {
        this.payName = payName;
    }

    public Integer getFlag() {
        return flag;
    }

    public void setFlag(Integer flag) {
        this.flag = flag;
    }

    public Integer getIsDelte() {
        return isDelte;
    }

    public void setIsDelte(Integer isDelte) {
        this.isDelte = isDelte;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public String getCreateId() {
        return createId;
    }

    public void setCreateId(String createId) {
        this.createId = createId;
    }
}
